<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>CK宠物狗狗 新闻</title>
	<jsp:include page="top_utils.jsp"></jsp:include>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/xw.css"/>
</head>
<body>
	<!-- 头部-->
	<div class="headnav">
		<div class="topBar">
			<div class="topBarL">
				<jsp:include page="logo.jsp"></jsp:include>
				<div class="nav">
					<ul>
						<li>
							<a href="${pageContext.request.contextPath }/">首页</a>
						</li>
						<li class="on">
							<a href="${pageContext.request.contextPath }/news/">新闻</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/adopt/">领养</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/knowledge/">知识</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/shopping/">商城</a>
						</li>
					</ul>
				</div>
			</div>
			<jsp:include page="topBarR.jsp"></jsp:include>
		</div>
	</div>

	<!-- 中间内容-->
	<div class="wp">
		<div class="contents"> 
			<!--中间顶部-->
			<div class="con-top">
				<h3>新闻</h3>
				<div class="cl" style="float: left; min-width: 200px; min-height: 30px;">
					<span class="album-subtitle">
   						<span>揭密第一手新闻资料</span>
					</span>
				</div>
			</div>
			<!-- 中间内容 -->
			<div class="inner">
				<!--左边-->
				<div class="inner-left">
					<div class="innernews">
						<c:if test="${isnull == 0}">
							<h1>${msg }</h1>
						</c:if>
						
						<c:if test="${isnull == 1}">
							<c:forEach var="item" items="${list}">
								<div class="newslist">
		               				<c:if test="${item.istop != '1' }">
		               					<c:if test="${item.imgurl != null}">
			               					<div class="new-pic">
												<a href="javascript:" target="_blank">
													<img src="${item.imgurl }" title="${item.title }">
												</a>
											</div>
										</c:if>
		               				</c:if>
									<div class="news-body">
										<h2>
											<a href="${pageContext.request.contextPath }/news/detail?key=${item.id}" target="_blank">${item.title }</a> 
										</h2>
										<div class="meta">
												<span class="meta-date">${item.uptime }</span>
												<span class="meta-date">发布人：${item.user.username }</span> 
		               					</div>
		               					<c:if test="${item.istop == '1' }">
		               						<p class="top-p">${item.text }</p>
		               					</c:if>
		               					<c:if test="${item.istop == '0' }">
		               						<p>${item.text }</p>
		               					</c:if>
									</div>
								</div>
							</c:forEach>
						</c:if>
					</div>
					

					<!-- 分页-->
					<div class="pgs">
						<div class="pg">
							<a href="javascript:" class="nxt">上一页</a>
							<strong>1</strong>
							<a href="http://www.petly.net/news/index.php?page=2" class="nxt">下一页</a>
						</div>
					</div>
				</div>

				<!--右边-->
				<div class="inner-right">
					<jsp:include page="remenyuedu.jsp"></jsp:include>

					<!-- 广告 -->
					<div class="ad-1">
						<a href="" target="_blank">
							<img src="../images/client/xw/ad-1.jpg" width="260">
						</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>